/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uit.ieproject.business;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import uit.ieproject.dataaccess.AddressDAO;
import uit.ieproject.entities.Address;
import uit.ieproject.utilites.DbConnection;

/**
 *
 * @author RedDevils
 */
public class AddressBLO {
    private AddressDAO addressDAO = new AddressDAO();
    
    public ArrayList<Address> getAllAddress() throws SQLException {
        return addressDAO.getAllAddress();
    }

    public void addAddress(Address address) throws SQLException {
        addressDAO.addAddress(address);
    }

    public void deleteAddress(long[] id) throws SQLException {
        addressDAO.deleteAddress(id);
    }

    public void editAddress(Address address) throws SQLException {
        addressDAO.editAddress(address);
    }
    
    public ArrayList<String> getInfoFromAddress(String address) throws SQLException {
        return addressDAO.getInfoFromAddress(address);
    }
    
    public ArrayList<String> getAddressColumn() throws SQLException {
        return addressDAO.getAddressColumn();
    }
}
